package com.ruike.mapper;

import com.ruike.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 吴泽胜
 * @FileName TeacherMapper
 * @date 2020-11-16 5:40 下午
 * @Software: IntelliJ IDEA
 */
@Mapper
public interface UserMapper  {
	
	//添加用户
	public void addUser(User user) throws Exception;
	
	//查询所有用户
	public List<User> getUserList() throws Exception;
	
	//根据用户名查询用户
	public User findUserByName(String username) throws Exception;
	
	//根据用户名模糊查询用户
	public List<User> getUserListByName(String username) throws Exception;
	
	//用户登录
	public User findUserByUsernameAndPassword(User user) throws Exception;
	
	//通过主键uid查询用户
	public User findUserById(Integer uid) throws Exception;

}
